package cn.oracle.eshop.cart.mapper;


import cn.oracle.eshop.cart.domain.ShoppingCartDO;
import cn.oracle.eshop.commondity.domain.PropertyDO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Options;
import org.apache.ibatis.annotations.Param;

/***
 *  购物车管理模块的mapper组件
 * @author wyh
 * @date 2022/2/14
 * @return
 */

@Mapper
public interface ShoppingCartMapper {
    /***
     * 根据用户账号ID查询购物车
     * @author wyh
     * @date 2022/2/14
     * @param userAccountId 用户账号ID
     * @return  购物车
    */
    ShoppingCartDO getShoppingCartByUserAccountId(@Param("userAccountId")Long userAccountId);
    /***
     * 新增购物车
     * @author wyh
     * @date 2022/2/14
     * @param shoppingCartDO 购物车DO对象
     * @return void
    */
    @Options(keyColumn = "id", keyProperty = "id", useGeneratedKeys = true)
    void saveShoppingCart(ShoppingCartDO shoppingCartDO);
}
